from django.db import models
from django.contrib.postgres.fields import JSONField


class KrNews(models.Model):
    kr_id = models.IntegerField(verbose_name='36kr新闻id')
    title = models.CharField(max_length=256, blank=True, verbose_name='标题')
    summary = models.CharField(max_length=256, blank=True, verbose_name='概要')
    date_published = models.DateTimeField(verbose_name='新闻日期')
    content = models.TextField(blank=True, verbose_name='新闻内容')
    tags = JSONField(blank=True, verbose_name='标签')
    # crawl_tag = models.CharField(max_length=256, blank=True, verbose_name='爬取标签')
    date_added = models.DateTimeField(auto_now_add=True, verbose_name='添加时间')
    date_updated = models.DateTimeField(auto_now=True, verbose_name='更新时间')

    class Meta:
        app_label = u'news'
        db_table = u'"xboard"."kr_news"'



